package com.smartleanx.module.hrm.service.esign.temp.result;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.List;

/**
 * e签宝模板控件返回
 *
 * @author xzq
 * @since 2025-07-07 16:43:52
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(description = "模板控件返回")
public class ComponentResult implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "合同名称")
    private String contractName;

    @Schema(description = "任务id")
    private Long taskId;

    @Schema(description = "控件名称")
    private List<Component> componentList;

    @Data
    public static class Component{
        @TableId(value = "id", type = IdType.ASSIGN_ID)
        private Long id;

        @Schema(description = "控件名称")
        private String componentName;

        @Schema(description = "控件类型")
        private Integer componentType;

        @Schema(description = "填写类型")
        private Integer fillInType;

        @Schema(description = "是否可填写")
        private Integer fillInUpdate;

        @Schema(description = "控件值")
        private String componentValue;

        @Schema(description = "控件id")
        private String componentId;

        @Schema(description = "是否必填")
        private Integer required;
    }
}
